//
//  Enemy.h
//  FrameWork
//
//  Created by Eagle on 4/29/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "cocos2d.h"
#import "MapManager.h"
#import "Parameter.h"

enum EnemyType {
	
	//步兵
	FOOT_MAN = 0,
	
	//藤甲兵
	TENGJIA_MAN,
	
	//骑兵
	CAVALRY,
	
	//重骑兵
	MAN_AT_ARMS,
	
	//巨象兵
	ELEPHANT_MAN,
	
	//战车
	TANK,
	
	//铁战车
	IRON_TANK
};



@interface Enemy : CCSprite {
	
	id		_idStr;//标识
	//kind 名字
	int		_typeName;
	
	//生命
	float _hp;
	
	//尸体腐烂时间
	int		_rotBodyTime;
	
	
	//作用半径
	float _range;
	
	//速度
	float _speed;
	
	//减速程度
	float _slowdown;
	
	//减速剩余时间
	int _slowtime;
	
	//是否被定身
	BOOL _isStop;
	
	//被定身的时间
	int _stopTime;
	
	
	//方向 1右边   2上边   3下边     4左边
	int _direction;
	
	//目标点
	CGPoint _goal;
	
	//状态 , 0 正常   1 到了终点   2减速,3死亡,4尸体消失
	int _status;
	
	//行数,用于遮挡处理
	int _row;
	
	//上一次目标位置
	Location * _location;
	
	//当前目标位置
	Location * _nextLocation;
	
	//杀死后掉落金钱
	int _money;
	
	//死后经验
	int _exp;
	
	//死后战功
	int _exploit;
}
@property (nonatomic, assign) float hp;
@property (nonatomic, assign) float range;

@property (nonatomic, assign) float speed;
@property (nonatomic, assign) float slowdown;
@property (nonatomic, assign) int slowtime;

@property (nonatomic, assign) BOOL isStop;
@property (nonatomic, assign) int stopTime;

@property (nonatomic, assign) int direction;
@property (nonatomic, assign) int status;
@property (nonatomic, assign) int row;
@property (nonatomic, retain) Location* location;
@property (nonatomic, retain) Location* nextLocation;
@property (nonatomic, assign) int money;
@property (nonatomic, assign) int exp;
@property (nonatomic, assign) int exploit;
@property (nonatomic, assign) int typeName;

@property (nonatomic ,assign) id  idStr;

@property (nonatomic,readwrite)int rotBodyTime;

-(void)changeOffPoint:(CGPoint)offPoint;

@end


//步兵
@interface FootMan : Enemy
{
	
}

+(id) enemy;

@end


//藤甲兵
@interface TengjiaMan : Enemy
{
	
}

+(id) enemy;

@end

//骑兵
@interface Cavalry : Enemy
{
	
}

+(id) enemy;

@end

//重骑兵
@interface ManAtArms : Enemy
{
	
}

+(id) enemy;

@end

//象兵
@interface ElephantMan : Enemy
{
	
}

+(id) enemy;

@end


//战车
@interface Tank : Enemy
{
	
}

+(id) enemy;

@end

//铁甲战车
@interface IronTank : Enemy
{
	
}

+(id) enemy;

@end


//孟获,Boss
@interface MongHuo : Enemy
{
	
}

+(id) enemy;

@end
